﻿using DbProject;
using DbProject.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbProject
{
    public class DbProjectContext : DbContext
    {
        public DbProjectContext()
            : base("DefaultConnection")
        {
        }

        public static void runMigrations()
        {
            Database.SetInitializer<DbProjectContext>(new MigrateDatabaseToLatestVersion<DbProjectContext, DbProject.Migrations.Configuration>());
        }

        public DbSet<UserModel> Users { get; set; }
        public DbSet<WorkerModel> Workers { set; get; }
        public DbSet<WorkerTimeStampModel> TimeStamps { set; get; }
    }
}
